<?php
include 'test_header.php';

class test_db_obj_ranklist extends UnitTestCase{
	
	private $db ; 

	function setUp(){
		$this->db = db_connect();

		$sql = "
CREATE TABLE IF NOT EXISTS `ranklist` (
  `rank` int(11) NOT NULL,
  `username` varchar(255) NOT NULL,
  PRIMARY KEY (`username`),
  UNIQUE KEY `rank` (`rank`),
  UNIQUE KEY `username` (`username`),
  UNIQUE KEY `rank_2` (`rank`),
  KEY `rank_3` (`rank`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;			
		";

		$res = $this->db->query( $sql );
	}

	function tearDown(){
		
		$sql = "drop table `ranklist`";

		$res = $this->db->query( $sql );
	
	}

	function test_create_ranklist_object(){
		
		$ranklist = new db_obj_ranklist( $this->db );
	}

}
	

$test = new test_db_obj_ranklist();
$test->run( new HtmlReporter() );

